﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace RightControl.Model.PlatForm {
    public class ListIterator {
        public int Index { get; set; }
        
        public List<int> DataList { get; set; }

        public int GetNextData() {
            if (DataList != null && DataList.Count > 0 && Index < DataList.Count - 1) {   
                return DataList[Index++];
            }
            else {
                return -1;
            }
        }


        public ListIterator(List<int> param) {
            DataList = param;
        }
    }
}
